#include "MyConnection.h"


class connectionRAII
{
private:
    MYSQL * conRAII;
    MyConnection * poolRAII;
public:
    connectionRAII(MYSQL ** con,MyConnection * connpool)
    {
        *con = connpool->getConn();
        conRAII = *con;
        poolRAII = connpool;
    }
    ~connectionRAII()
    {
        poolRAII->releaseConn(conRAII);
    }
};


